/**
 * 用于导出动作，不管是异步动作，还是同步动作
 */

export const addCount = { type: "counter/incremenet" };

export const addCountAsync = (dispatch: any) => {
  setTimeout(() => {
    console.log("dispatch", dispatch);
    // 再去派发普通的动作
    dispatch({ type: "counter/increment" });
  }, 1000);
};
